package com.cpg.school.mybatis.mapper;

import org.apache.ibatis.annotations.Mapper;

import java.util.List;
import java.util.Map;

@Mapper
public interface TeacherMapper {
    /**
     * 获取系别
     *
     * @return
     */
    List<Map> getDepartments();

    /**
     * 根据年级id获取班级列表
     *
     * @return
     */
    List<Map> grade_list(int id);

    List<Map> student_list_table(int teacher_id, int page);

    int student_count(int teacher_id);

    List<Map> teacher_grade_list(int teacher_id);

    int add_user_student(Map param);

    int put_user_grade(Map param);

    Map student_edit_view(int id);

    int update_user_student(Map param);

    int student_del(int id);

    int student_del_user(int id);

    int question_bank_count(int id);

    List<Map> question_bank_list_table(int teacher_id, int page);

    int question_bank_add(int teacher_id, int question_type, String question_name, String question_explain);

    Map question_bank_edit_view(int id);

    int question_bank_edit(int id, int question_type, String question_name, String question_explain);

    int question_bank_del(int id, int teacher_id);

    int question_bank_del_subjects(int id, int teacher_id);

    List<Map> question_subjects(int id);

    int question_subjects_add(int id, int type, String title, String choice, String right_key, int fraction);

    Map question_subjects_edit_view(int id);

    int question_subjects_edit(int id, int type, String title, String choice, String right_key, int fraction);

    int question_subjects_del(int id);

    int question_bank_send_count(int id);

    List<Map> question_bank_send_list(int id, int page);

    int question_bank_send_add(int grade_id, int question_id);

    Map question_bank_send_edit_view(int id);

    int question_bank_send_edit(int id, int grade_id, int question_id);

    int question_bank_send_del(int id);

    List<Map> select_question_list(int id);

    int student_answers_list_count(int grade_id, int question_id);

    List<Map> student_answers_list_table(int grade_id, int question_id, int page);

    List<Map> student_answers_view(int uid, int qid);

    int student_answers_correct(int uid, int qid, int status);

    int student_answers_correct_add(int uid, int qid, int status);
}
